<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no"/>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>爱贝儿医</title>
    <script src="business/js/jquery.js"></script>
    <link rel="stylesheet" href="business/style/common.css?<?=版本?>">
    <script src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script src="app/js/common.js"></script>
</head>
<?php

/**
 * Created by PhpStorm. User: ADun, Date: 14-10-15 下午10:11
 * Description:
 */
?>

<body>
<div class="header" style="z-index: 100;"><div class="header_logo"><img src="<?=G_SITE_CDN?>/business/style/logo_small.png" /><h1>病例</h1></div>
    <a href="<?= $case_add_url?>"><input name="" type="button" value="发布病例" /></a></div>

<!--病例-首页-->
<div class="nav">
    <ul>
        <li <?php if(($_GET['zt']=='id'|| !isset($_GET['zt']))&& !isset($_GET['an'])) echo "class='cli'";?> ><a href="<?=$case_list_url?>&zt=id">全部</a></li>
        <li <?php if($_GET['zt']=='添加时间') echo "class='cli'";?>><a href="<?=$case_list_url?>&zt=添加时间">最新发布</a></li>
        <li <?php if($_GET['zt']=='评论次数') echo "class='cli'";?>><a href="<?=$case_list_url?>&zt=评论次数">正在热议</a></li>
        <li <?php if($_GET['an']=='已回答') echo "class='cli'";?>><a href="<?=$case_list_url?>&an=已回答">已讨论</a></li>
        <li <?php if($_GET['an']=='待回答') echo "class='cli'";?>><a href="<?=$case_list_url?>&an=待回答">待讨论</a></li>
    </ul>
</div>
<div class="search">

    <form action="" method="post">
        <input name="标题" type="text" id="keyword" class="txt" value="  搜索病例关键词…" onFocus="if(value==defaultValue){value='';this.style.color='#000'}" onBlur="if(!value){value=defaultValue;this.style.color='#ccc'}" />
        <div class="btn_bg"><input class="btn" type="submit" value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"></div></div>

</form>


<div class="case_list">

    <?php
    foreach($case_list as  $key=>$value):
    $avatar = trim($value['头像']);
    if ($avatar=='没有图片'||$avatar=="") {
         $avatar = G_SITE_CDN .'/cache/card_img/top_index.jpg';
    }
    if (substr($avatar, 0, 4) != 'http') {
         $avatar = G_SITE_CDN .'/business/'. $avatar;
    }?>
        <a href="<?= $case_detail_url.'&id='.$value['id']?>">
            <table>
                <tr>
                    <td width="90"><div class="img"><img style="width: 96%;padding: 3% 0;"  src="<?=$avatar ?>"  /></div></td>
                    <td>
                        <p style=" color: #262626"><?=   $value['title']?></p>
                        <!-- <h2><?=  mb_substr($value['title'],0,15,'utf-8')?></h2>
                        <p style=" color: #262626"><?=   $value['关键词'] ?></p>-->
                        <p>
                        <div class="author"><?= $value['name']?></div>
                        <div class="mores">
                            <span class="reply"><?=$value['评论次数']?></span>
                            <span>|</span><span class="reply2"><?=  $value['浏览次数']?></span>
                            <span>|</span><span class="time"><?=  substr($value['添加时间'],5,5);?></span></div>
                        </p>
                    </td>
                </tr>
            </table>
        </a>


    <?php endforeach;?>


</div>
<div class="pages">
<?= $page->showpage_weixin(); ?></div>
</div>
<?php require 'app/templates/common/download.html'; ?></body>

<script language="javascript">
    wx.config({
        debug: false,
        appId: '<?php echo $this->signPackage["appId"];?>',
        timestamp: <?php echo $this->signPackage["timestamp"];?>,
    nonceStr: '<?php echo $this->signPackage["nonceStr"];?>',
            signature: '<?php echo $this->signPackage["signature"];?>',
            jsApiList: [
        'onMenuShareAppMessage',
        'onMenuShareTimeline',
        'onMenuShareQQ',
        'onMenuShareWeibo',
        'onMenuShareQZone'
    ]
    });

    title = '爱贝儿医-爱病例';
    desc = '爱贝儿医—专注于做儿科医生间学习工作交流平台。平台拥有数十位来自省级以上重点三甲医院的儿科专家、重点医院儿科学科带头人、国内儿科权威人士组成的豪华专家团队。';
    links = '';
    imgUrl = '<?=G_SITE_CDN?>/business/img/logoRed2.png';
    weixinShare(title, desc, links, imgUrl);
</script>
<?php require 'app/templates/common/foot.html'; ?>
</body>
</html>
